from django.contrib import admin
from django.urls import path, re_path
from django.views.static import serve
from yk import settings
from web.views import *

urlpatterns = [
    # media动态文件
    re_path(r'^media/(?P<path>.*)$', serve, {"document_root": settings.MEDIA_ROOT}),
    # 后台管理
    path('admin/', admin.site.urls),
    # 数据录入
    path('load/', load, name="load"),
    # 主页
    path('', index, name="index"),
    path('index/', index),
    path('get_sale_info/', get_sale_info, name="get_sale_info"),
    # 检索页面
    path('search/', search, name="search"),
    # 销售数据整体可视化
    path('chart/', chart, name="chart"),
    path('get_profit_info/', get_profit_info, name="get_profit_info"),
    path('push_pie2_data/', push_pie2_data, name="push_pie2_data"),
    # 预测
    path('predict/', predict, name="predict"),
    # 登录注册相关
    path('logout/', logout, name="logout"),
    path('login/', login, name="login"),
    path('register/', register, name="register"),
    path('get_validCodeImg/', get_valid_code_img, name="get_validCodeImg"),
]
